From b1f3138ed7e9f2ff257a1470d3dc239913e17e50 Mon Sep 17 00:00:00 2001 From: "shand@ubuntu.eng.hq.xensource.com" Date: Fri, 9 Sep 2005 15:11:18 -0800 Subject: [PATCH] Fix xm info handling of empty strings (fix bugzilla bug #216) Signed-off-by: Steven Hand --- tools/python/xen/xm/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 92782d2ae9..b031081fe1 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -450,7 +450,10 @@ def xm_info(args): info = server.xend_node() for x in info[1:]: - print "%-23s:" % x[0], x[1] + if len(x) < 2: + print "%-23s: (none)" % x[0] + else: + print "%-23s:" % x[0], x[1] # TODO: remove as soon as console server shows up def xm_console(args): -- 2.30.2